package com.ocom.devicehttp.feign.machine;

import com.alibaba.fastjson.JSONObject;
import com.ocom.common.constant.PayConfigUrl;
import com.ocom.common.constant.UnifiendPayUrl;
import com.ocom.common.entity.payconfig.EntityMqttDevice;
import com.ocom.common.request.payconfig.*;
import com.ocom.common.request.payconfig.adreceiptinfo.GetAdReceiptInfoRequest;
import com.ocom.common.request.payconfig.mealorder.GetMerchPointListRequest;
import com.ocom.common.request.payconfig.mealorder.GetOrderDishesRequest;
import com.ocom.common.request.payconfig.mealorder.GetOrderPlanDishesRequest;
import com.ocom.common.request.payconfig.mealorder.GetOrderPlanMealRequest;
import com.ocom.common.request.web.ConsTimeConfigOnShowRequest;
import com.ocom.common.request.xfrecde.GetUserOrdered;
import com.ocom.common.resp.Result;
import com.ocom.common.vo.emqx.GetDeviceArgsVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(value = "payconfig")
public interface PayConfigClientService {

	@PostMapping(PayConfigUrl.URLP_PayConfig_adList)
	public Result adList(@RequestParam("comId") Long comId,
						 @RequestParam("deviceType") Integer deviceType,
						 @RequestParam("type") Integer type);


	@PostMapping(PayConfigUrl.URL_getPointDishes)
	public Result getPointDishes(@RequestBody GetPointDishesRequest request) ;


	@PostMapping(PayConfigUrl.Url_getOrderPlanDishes)
	public Result getOrderPlanDishes(@RequestBody GetOrderPlanDishesRequest request) ;


	@PostMapping(PayConfigUrl.Url_dishesClassOfCom)
	public Result dishesClassOfCom(@RequestParam("comId") Long comId);


	//2.1.获取餐段名称信息(getMealNameInfo)
	@GetMapping(PayConfigUrl.URLP_PayConfig_GetMealNameInfo)
	Result GetMealNameInfo(@RequestParam("comId") Long comId);


	@PostMapping(PayConfigUrl.Url_getOrderPlanMeal)
	public Result getOrderPlanMeal(@RequestBody GetOrderPlanMealRequest request) ;


	@PostMapping(UnifiendPayUrl.URL_getUserOrdered)
	public Result getUserOrdered(@RequestBody GetUserOrdered request);


	//2.2.获取餐段时间信息(getMealTimeInfo)
	@PostMapping(PayConfigUrl.URLP_PayConfig_GetMealTimeInfo)
	Result GetMealTimeInfo(@RequestBody ConsTimeConfigOnShowRequest request);


	/**
	 * 11.4.3已点餐查询（getOrderDishes）
	 */
	@PostMapping(PayConfigUrl.Url_getOrderDishes)
	public Result getOrderDishes(@RequestBody GetOrderDishesRequest request) ;


	//2.69 获取取餐点信息（getAdReceiptInfo）
	@PostMapping(PayConfigUrl.Url_getAdReceiptInfo)
	public Result getAdReceiptInfo(@RequestBody GetAdReceiptInfoRequest request);

	/**
	 * 11.4.2商户、消费点列表（getMerchPointList）
	 */
	@PostMapping(PayConfigUrl.Url_getMerchPointList)
	public Result getMerchPointList(@RequestBody GetMerchPointListRequest request) ;

	@PostMapping(PayConfigUrl.URL_getMqttDevice)
	public Result<List<GetDeviceArgsVo>> getMqttDevice(@RequestBody GetMqttDeviceRequest request);

	@PostMapping(PayConfigUrl.URL_getMqttDeviceInfo)
	public Result<EntityMqttDevice> getMqttDeviceInfo(@RequestParam("deviceNo") String deviceNo) ;

	@PostMapping(PayConfigUrl.URL_newMqttOrder)
	public Result<EntityMqttDevice> newMqttOrder(@RequestBody NewMqttOrderRequest request);

	@PostMapping(PayConfigUrl.URL_payMqttOrder)
	public Result payMqttOrder(@RequestBody PayMqttOrderRequest request);

	@PostMapping(PayConfigUrl.URL_cancelMqttOrder)
	public Result cancelMqttOrder(@RequestBody CancelMqttOrderRequest request);


	@PostMapping(PayConfigUrl.Url_getDeviceInfoMigrate)
	public Result getDeviceInfoMigrate(@RequestParam("comId") Long comId, @RequestParam("machNo")String machNo);

	@PostMapping(PayConfigUrl.URL_iotDeviceDetail)
	public Result iotDeviceDetail(@RequestBody JSONObject jsonObject);

	//增加菜品（newDishes）
	@PostMapping(PayConfigUrl.Url_newDishes)
	public Result newDishes(@RequestBody JSONObject jsonObject);

	@PostMapping(PayConfigUrl.URL_shipment)
	public Result shipment(Map<String, Object> map);

	@PostMapping(PayConfigUrl.URL_weimiDeviceInfo)
	public Result deviceInfo(@RequestBody Map<String, Object> map);

}
